Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: [recent] Refactor recent display widget and session management #1005

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

Kakueeen
Copy link
Contributor

Refactored recent display widget to use a unified list view for both projects and documents, improving code organization and reducing duplication. Major changes include:

  • Combined project and document views into single RecentListView
  • Improved session management with dirty state tracking
  • Refactored session item widget to use animation for expand/collapse
  • Updated session service interface for better state handling
  • Simplified recent display widget UI layout and event handling

Log: Refactor recent module UI components and session management

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • SessionManagerModule::initInterfaces函数中,markSessionFileDirty的绑定可能不需要,因为SessionManager类中已经定义了该函数。
  • SessionManager::SessionManager构造函数中,saveSession的调用被移动到了aboutToQuit信号的处理中,这可能会导致在应用程序退出时保存会话,但可能不是预期的行为。
  • SessionManager::saveSession函数中,return true;被删除,这可能会影响函数的返回值,需要确认这是否是预期的更改。
  • RecentDisplayWidget::addDocumentRecentDisplayWidget::addProject函数中,itemListitem的更新逻辑可能需要重新考虑,以确保列表的顺序和唯一性。
  • RecentDisplayWidget::doDoubleClicked函数中,对于项目的双击事件处理和文档的双击事件处理合并在一起,可能会导致逻辑混乱,需要确认这是否是预期的行为。
  • RecentDisplayWidget::clearRecent函数中,d->recentSettings.removeGroup的调用可能需要更详细的逻辑来确保所有相关的设置都被清除。
  • RecentListView::appendItemRecentListView::prependItem函数中,对于项目的插入位置逻辑可能需要重新考虑,以确保列表的顺序和唯一性。
  • RecentListView::createItem函数中,对于项目的创建逻辑可能需要重新考虑,以确保项目的正确创建和显示。

是否建议立即修改:

代码审查反馈:

  • 确认markSessionFileDirty函数在SessionManagerModule::initInterfaces中的绑定是否必要。
  • 重新评估SessionManager::SessionManager构造函数中对saveSession的调用位置,确保这是否符合预期行为。
  • 确认SessionManager::saveSession函数中删除return true;的改动是否符合预期。
  • 优化RecentDisplayWidget::addDocumentRecentDisplayWidget::addProject函数中的列表更新逻辑,确保列表的顺序和唯一性。
  • 重新考虑RecentDisplayWidget::doDoubleClicked函数中项目双击事件和文档双击事件的处理逻辑,确保逻辑清晰。
  • 重新考虑RecentDisplayWidget::clearRecent函数中设置清除逻辑,确保所有相关的设置都被正确清除。
  • 优化RecentListView::appendItemRecentListView::prependItem函数中的项目插入位置逻辑,确保列表的顺序和唯一性。
  • 优化RecentListView::createItem函数中的项目创建逻辑,确保项目的正确创建和显示。

@Kakueeen Kakueeen force-pushed the session branch 2 times, most recently from 6281137 to b5e8704 Compare November 26, 2024 09:44
Refactored recent display widget to use a unified list view for both projects and documents, improving code organization and reducing duplication.  Major changes include:

- Combined project and document views into single RecentListView
- Improved session management with dirty state tracking
- Refactored session item widget to use animation for expand/collapse
- Updated session service interface for better state handling
- Simplified recent display widget UI layout and event handling

Log: Refactor recent module UI components and session management
@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepin-mozart, Kakueeen, LiHua000

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-mozart deepin-mozart merged commit f5c081a into linuxdeepin:master Nov 26, 2024
9 of 10 checks passed
Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "src/plugins/codegeex/codegeexmanager.cpp": [
        {
            "line": "static const char *kUrlSSEChat = \"https://codegeex.cn/prod/code/chatCodeSseV3/chat\";",
            "line_number": 29,
            "rule": "S35",
            "reason": "Url link | 9a3dc8cf24"
        },
        {
            "line": "static const char *kUrlNewSession = \"https://codegeex.cn/prod/code/chatGlmTalk/insert\";",
            "line_number": 31,
            "rule": "S35",
            "reason": "Url link | bed2c163c5"
        },
        {
            "line": "static const char *kUrlDeleteSession = \"https://codegeex.cn/prod/code/chatGlmTalk/delete\";",
            "line_number": 32,
            "rule": "S35",
            "reason": "Url link | 1c26bba3f3"
        },
        {
            "line": "static const char *kUrlQuerySession = \"https://codegeex.cn/prod/code/chatGlmTalk/selectList\";",
            "line_number": 33,
            "rule": "S35",
            "reason": "Url link | 354cff53d7"
        },
        {
            "line": "static const char *kUrlQueryMessage = \"https://codegeex.cn/prod/code/chatGmlMsg/selectList\";",
            "line_number": 34,
            "rule": "S35",
            "reason": "Url link | 63ba5cece9"
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants